import Vue from 'vue'
import VueRouter from 'vue-router'
import routes from './router/router'
import store from './store/'
import ajax from './config/ajax'
import './style/common'
import './config/rem'
import waterfall from 'vue-waterfall2'
import platform from './config/platform'

// 使用模块化机制编程，导入Vue和VueRouter,要调用Vue.use(VueRouter)
// 创建router实例，然后传'routes'配置
Vue.use(VueRouter)
Vue.use(waterfall)
const router = new VueRouter({
	routes: routes  // (缩写)相当于routes : routes
})

// 创建和挂载实例，通过router配置注入路由，从而让整个应用都有路由功能
new Vue({
	router,
	store,
	ajax,
	platform
}).$mount('#app')